package com.tuo51.evaluate.vo.users;

import com.tuo51.core.domain.org.Organization;
import com.tuo51.core.domain.staffs.StaffExtInfo;
import lombok.Data;

import java.util.Date;

/**
 * *******************************
 * Created by Ron.
 * form com.tuo51
 * on 2017/7/18
 * *******************************
 */
@Data
public class StaffExtInfoVO {

    private Date birthday = new Date();

    private String department;

    private String position;

    private String email;

    //info for wx user
    private String language;
    private String city;
    private String province;
    private String country;
    private String remark;

    //info for organization
    private String areaName;

    private String areaAddress;

    private String areaCode;

    private String areaCodeDesc;

    private String areaPhone;

    private String areaLogo;

    public static StaffExtInfoVO of(StaffExtInfo extInfo, Organization org) {
        StaffExtInfoVO vo = new StaffExtInfoVO();

//        private String department;
//        private String position;
//        private String email;
        vo.setBirthday(extInfo.getBirthday());
        vo.setDepartment(extInfo.getDepartment());
        vo.setPosition(extInfo.getPosition());
        vo.setEmail(extInfo.getEmail());

//        private String language;
//        private String city;
//        private String province;
//        private String country;
//        private String remark;
        vo.setLanguage(extInfo.getLanguage());
        vo.setCity(extInfo.getCity());
        vo.setProvince(extInfo.getProvince());
        vo.setCountry(extInfo.getCountry());
        vo.setRemark(extInfo.getRemark());

//        private String areaName;
//        private String areaAddress;
//        private String areaCode;
//        private String areaCodeDesc;
//        private String areaPhone;
//        private String areaLogo;
        vo.setAreaName(org.getName());
        vo.setAreaAddress(org.getAddress());
        vo.setAreaCode(org.getPcaCode());
        vo.setAreaCodeDesc(org.getPcaCodeDesc());
        vo.setAreaPhone(org.getContactNumber());
        vo.setAreaLogo(org.getLogo());

        return vo;
    }

}
